package com.chenglai.seckill.dao;

import com.chenglai.seckill.pojo.SeckillInfo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

/**
 * 类描述：
 *
 * @Author rxh
 * @Date 2023/11/23 14:19
 */
@Repository
public interface SeckillInfoMapper extends Mapper<SeckillInfo>, MySqlMapper<SeckillInfo> {


    @Select("select TOP 1 * from t_cl_seckill_info where shopId = #{shopId} and start_time >= #{startTime} ORDER BY start_time desc ")
    SeckillInfo getLatelySeckillInfo(Integer shopId,String startTime);
}
